
 CALL uvse_ExistsOrCreate('ART_FAM');


 INSERT INTO se_art_fam
 (SELECT   ID,
           POSTEANA,
           SECTANA,
           NULL,
           NOMCEE,
           NULL,
           'N',
           LIBELLE,
           NULL,
           Decode(PERTE,NULL,1,(PERTE+100)/100),
           COEFMAT
    FROM uv_pfamilles) ;

 UPDATE se_art_fam tf SET enreg_id=(select enreg_id FROM erp_mli2.art_fam f WHERE f.fam_cod=tf.fam_cod) ;
 UPDATE se_art_fam tf SET enreg_id=outils_mli2.enreg_id.NEXTVAL WHERE enreg_id IS NULL;



 CALL uvse_synchroverserp('enreg_id','ART_FAM','O') ;

 commit;